<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>停车场管理系统 - 登录</title>
    <link rel="stylesheet" href="css/login.css">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
</head>
<body>
    <div class="particles"></div>
    <div class="floating-bg"></div>
    <div class="container">
        <div class="login-box" id="app">
            <div class="login-header">
                <i class="fas fa-parking"></i>
                <h2>停车场管理系统</h2>
            </div>
            <div class="login-form">
                <div class="form-group">
                    <div class="input-group">
                        <i class="fas fa-user"></i>
                        <input type="text" 
                               v-model="loginForm.userName" 
                               placeholder="请输入用户名"
                               @focus="handleFocus"
                               @blur="handleBlur"
                               required>
                    </div>
                </div>
                <div class="form-group">
                    <div class="input-group">
                        <i class="fas fa-lock"></i>
                        <input :type="showPassword ? 'text' : 'password'" 
                               v-model="loginForm.password" 
                               placeholder="请输入密码"
                               @focus="handleFocus"
                               @blur="handleBlur"
                               required>
                        <i class="fas" 
                           :class="showPassword ? 'fa-eye-slash' : 'fa-eye'"
                           @click="togglePassword"></i>
                    </div>
                </div>
                <div class="form-group">
                    <button type="button" 
                            @click="handleLogin" 
                            :class="{'loading': isLoading}"
                            :disabled="isLoading">
                        <span v-if="!isLoading">登录</span>
                        <span v-else class="loading-spinner"></span>
                    </button>
                </div>
                <transition name="fade">
                    <div class="error-message" v-if="errorMessage">
                        <i class="fas fa-exclamation-circle"></i>
                        {{ errorMessage }}
                    </div>
                </transition>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14"></script>
    <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
    <script src="js/login.js"></script>
    <script src="js/particles.js"></script>
</body>
</html> 